﻿@using (Html.Bootstrap().Container().Begin())
{
    @Html.Bootstrap().Heading1("Manual")
    using (Html.Bootstrap().Div().SetId("test-manual").Begin())
    {
        using (var pagination = Html.Bootstrap().Pagination().Begin())
        {
            @pagination.PageNum("1", "http://google.com")
            @pagination.PageNum("2").SetActive()
            @pagination.PageNum("3").SetDisabled()
            @pagination.PageNum("4")
        }
    }
    
    <hr />

    @Html.Bootstrap().Heading1("Automatic")
    using (Html.Bootstrap().Div().SetId("test-automatic").Begin())
    {
        @Html.Bootstrap().Pagination().AddPrevious().AddPage("http://google.com").AddPage(active: true).AddPage(disabled: true).AddPage().AddNext()
    }

    <hr />

    @Html.Bootstrap().Heading1("Add Pages")
    using (Html.Bootstrap().Div().SetId("test-add-pages").Begin())
    {
        @Html.Bootstrap().Pagination().AddPages(new [] {"http://google.com", "http://bing.com", "http://yahoo.com"}, 5, 4)
    }

    <hr />

    @Html.Bootstrap().Heading1("Add Pages With Text")
    using (Html.Bootstrap().Div().SetId("test-add-pages-with-text").Begin())
    {
        @Html.Bootstrap().Pagination().AddPages(new[]
        {
            new KeyValuePair<string, string>("Google", "http://google.com"),
            new KeyValuePair<string, string>("Bing", "http://bing.com"),
            new KeyValuePair<string, string>("Yahoo!", "http://yahoo.com")
        }, 2)
    }

    <hr />

    @Html.Bootstrap().Heading1("Add Pages With Text And Nulls")
    using (Html.Bootstrap().Div().SetId("test-add-pages-with-text-and-nulls").Begin())
    {
        @Html.Bootstrap().Pagination(new StringKeyValueList
        {
            { "Previous", null },
            { "1", "#" },
            { "2", "#" },
            { "3", "#" },
            { "4", "#" },
            { "...", null },
            { "8", "#" },
            { "Next", "#" }
        }, 2)
    }

    <hr />

    @Html.Bootstrap().Heading1("Sizes")
    using (Html.Bootstrap().Div().SetId("test-sizes").Begin())
    {
        @Html.Bootstrap().Pagination().AddPrevious().AddPage("http://google.com").AddPage(active: true).AddPage(disabled: true).AddPage().AddNext().SetSize(PaginationSize.Lg)
        @Html.Bootstrap().Pagination().AddPrevious().AddPage("http://google.com").AddPage(active: true).AddPage(disabled: true).AddPage().AddNext().SetSize(PaginationSize.Sm)
    }
}